From e3aaf3312cd5c118179bc88fe6b16947b831dcd9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20H=C3=A4rdeman?= Date: Sun, 26 Oct 2025 09:33:17 +0100 Subject: [PATCH] odhcpd: remove the "ra_management" option MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The option is marked as deprecated since 2019 in the odhcpd code base. It has been superseded by the "ra_flags" and "ra_slaac" options, which provide more fine-grained control, and having several different configuration options controlling the same thing is a potential source of confusion. The option is, and has always been, undocumented. Furthermore, I've grepped through the LuCI source tree, and it contains logic to control "ra_flags" and "ra_slaac", but no references to "ra_management" at all. The only references in the openwrt tree is inside the dnsmasq init script, but that is a dnsmasq-internal thing and, again, the option cannot be set from LuCI, meaning I think we can assume that it has limited usage. So, remove it. Signed-off-by: David Härdeman Link: https://github.com/openwrt/odhcpd/pull/294 Signed-off-by: Álvaro Fernández Rojas --- README.md | 1 - src/config.c | 23 ----------------------- 2 files changed, 24 deletions(-) diff --git a/README.md b/README.md index e483456..8e70f85 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,6 @@ and may also receive information from ubus | ndp_from_link_local |bool | 1 | Use link-local source addresses for NDP operations (RFC 4861, §4.2 compliance) and macOS compatibility | | prefix_filter |string |`::/0` | Only advertise on-link prefixes within the provided IPv6 prefix; others are filtered out. [IPv6 prefix] | | ntp |list |``| NTP servers to announce accepts IPv4 and IPv6 | -| ra_management |string | - | TBD | | upstream |list | - | TBD | | ra_advrouter |bool | - | TBD | diff --git a/src/config.c b/src/config.c index ebd9253..4bf8b2a 100644 --- a/src/config.c +++ b/src/config.c @@ -112,7 +112,6 @@ enum { IFACE_ATTR_DHCPV6_NA, IFACE_ATTR_DHCPV6_HOSTID_LEN, IFACE_ATTR_RA_DEFAULT, - IFACE_ATTR_RA_MANAGEMENT, IFACE_ATTR_RA_FLAGS, IFACE_ATTR_RA_SLAAC, IFACE_ATTR_RA_OFFLINK, @@ -164,7 +163,6 @@ static const struct blobmsg_policy iface_attrs[IFACE_ATTR_MAX] = { [IFACE_ATTR_DHCPV6_NA] = { .name = "dhcpv6_na", .type = BLOBMSG_TYPE_BOOL }, [IFACE_ATTR_DHCPV6_HOSTID_LEN] = { .name = "dhcpv6_hostidlength", .type = BLOBMSG_TYPE_INT32 }, [IFACE_ATTR_RA_DEFAULT] = { .name = "ra_default", .type = BLOBMSG_TYPE_INT32 }, - [IFACE_ATTR_RA_MANAGEMENT] = { .name = "ra_management", .type = BLOBMSG_TYPE_INT32 }, [IFACE_ATTR_RA_FLAGS] = { .name = "ra_flags", . type = BLOBMSG_TYPE_ARRAY }, [IFACE_ATTR_RA_SLAAC] = { .name = "ra_slaac", .type = BLOBMSG_TYPE_BOOL }, [IFACE_ATTR_RA_OFFLINK] = { .name = "ra_offlink", .type = BLOBMSG_TYPE_BOOL }, @@ -1427,27 +1425,6 @@ int config_parse_interface(void *data, size_t len, const char *name, bool overwr if ((c = tb[IFACE_ATTR_RA_DEFAULT])) iface->default_router = blobmsg_get_u32(c); - /* IFACE_ATTR_RA_MANAGEMENT aka ra_management is deprecated since 2019 */ - if (!tb[IFACE_ATTR_RA_FLAGS] && !tb[IFACE_ATTR_RA_SLAAC] && - (c = tb[IFACE_ATTR_RA_MANAGEMENT])) { - switch (blobmsg_get_u32(c)) { - case 0: - iface->ra_flags = ND_RA_FLAG_OTHER; - iface->ra_slaac = true; - break; - case 1: - iface->ra_flags = ND_RA_FLAG_OTHER|ND_RA_FLAG_MANAGED; - iface->ra_slaac = true; - break; - case 2: - iface->ra_flags = ND_RA_FLAG_OTHER|ND_RA_FLAG_MANAGED; - iface->ra_slaac = false; - break; - default: - break; - } - } - if ((c = tb[IFACE_ATTR_RA_FLAGS])) { iface->ra_flags = 0; -- 2.30.2